#pragma once 

#define SIZE 4096
#define FLUSH_NONE 1
#define FLUSH_LINE (1<<1) 
#define FLUSH_ALL (1<<2)

typedef struct myFILE
{
    int fileno;
    int flag;
    char buffer[SIZE];
    int end;
}myFILE;


//c c++ 函数声明可以不加extern  因为没有函数体用;结束表示声明   变量声明时不能省略extern 
extern myFILE* my_fopen(const char* path,const char *mode);
extern int my_fwrite(const char* s,int num, myFILE* stream);
extern int my_fflush(myFILE* stream); 
extern int my_fclose(myFILE* stream);
